local joy__xiefang = fk.CreateSkill {

  name = "joy__xiefang",

  tags = {  },

}



joy__xiefang:addEffect("distance", {
  name = "joy__xiefang",
  correct_func = function(self, from, to)
    if from:hasSkill(joy__xiefang.name) then
      local n = 0
      for _, p in ipairs(Fk:currentRoom().alive_players) do
        if p.gender == General.Female then
          n = n + 1
        end
      end
      local m = math.max(n,1)
      return -m
    end
    return 0
  end,
})

joy__xiefang:addEffect("maxcards", {
  name = "#joy__xiefang_maxcards",
  correct_func = function(self, player)
    if player:hasSkill(joy__xiefang.name) then
      local n = 0
      for _, p in ipairs(Fk:currentRoom().alive_players) do
        if p.gender == General.Female then
          n = n + 1
        end
      end
      local m = math.max(n,1)
      return m
    end
    return 0
  end,
})

return joy__xiefang